Skip to content

fix(ci): retry only the answers that can change on a second attempt - #14

Merged
yunze7373 merged 1 commit into
mainfrom
fix/skill-release-retry-classification
Aug 12, 2026
Merged

fix(ci): retry only the answers that can change on a second attempt#14
yunze7373 merged 1 commit into
mainfrom
fix/skill-release-retry-classification

Conversation

@yunze7373

Copy link
Copy Markdown
Member

Problem

The previous change classified every 4xx as final. A 429 rate limit or a
408 timeout would then fail the release on the first answer, even though both
can succeed moments later.

An intermediate version tried to handle this with an empty 408 | 429) branch,
which does not work: ;; ends the branch instead of falling through, so a
retryable status would have left the while loop spinning with no delay and no
attempt counter.

Changes

  • Retry 000 (transport failure), 408, 429, and 5xx; report anything else at once.
  • Move the retry bookkeeping out of a case branch to after the case statement, so no status can skip the delay or the attempt count.

Verification

The retry loop was extracted from the parsed workflow with the HTTP call
replaced by a stub that returns a scripted sequence of status codes:

Scenario Exit Retried Outcome
202 0 0 accepted
403 1 0 not retried
401 1 0 not retried
404 1 0 not retried
429 then 202 0 1 accepted
500 then 202 0 1 accepted
000 then 202 0 1 accepted
408 throughout 1 2 failed after 3 attempts
503 throughout 1 2 failed after 3 attempts

npm run lint clean, npm test 140/140.

Treating every 4xx as final would have failed a release on a 429 rate limit
or a 408 timeout, which are both worth another attempt. Retry those two along
with 5xx and transport failures, and report anything else immediately.

The retry bookkeeping now lives after the case statement rather than inside a
branch, so a retryable status cannot leave the loop spinning without a delay
or an attempt count.
@yunze7373
yunze7373 merged commit 22c2fca into main Aug 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant